//
//  BattleLayer.h
//  SpaceStorm
//
//  Created by 祥 雍 on 13-4-10.
//  Copyright (c) 2013年 __MyCompanyName__. All rights reserved.
//
//  [战斗场景／层]包含战斗所有的层
//  用户输入层－>UI层->舰载机层->导弹层->主战斗层->近陨石层->远陨石层->背景层

#import "cocos2d.h"
#import "BattleMainLayer.h"
#import "BattleBackGroundLayer.h"
#import "BattleMeteoriteLayer.h"
#import "BattleMissileLayer.h"
#import "BattleAirplaneLayer.h"
#import "BattleUILayer.h"
#import "BattleInputLayer.h"
#import "Constants.h"
#import "Camera.h"

typedef enum
{
    LayerTagINVALID = 0,
    LayerTagBackGround,
    LayerTagFarMeteorite,
    LayerTagNearMeteorite,
    LayerTagMain,
    LayerTagMissile,
    LayerTagAirplane,
    LayerTagUI,
    LayerInputUI,
    LayerTagMAX,
} LayerTag;

@interface BattleScene : CCLayer
{
    Camera* _camera;
}

//游戏的每个层
@property (readonly) BattleBackGroundLayer* backGroundLayer;    //背景层
@property (readonly) BattleMeteoriteLayer* farMeteoriteLayer;   //远陨石层
@property (readonly) BattleMeteoriteLayer* nearMeteoriteLayer;  //近陨石层
@property (readonly) BattleMainLayer* mainLayer;                //主战斗层
@property (readonly) BattleMissileLayer* missileLayer;          //导弹层
@property (readonly) BattleAirplaneLayer* airplaneLayer;        //舰载机层
@property (readonly) BattleUILayer* uiLayer;                    //UI层
@property (readonly) BattleInputLayer* inputLayer;               //输入层

//其他属性
@property (readwrite, retain) Camera* camera;                    //camera


+(BattleScene *) sharedLayer;
+(CCScene *) scene;

-(void) initLayer;
-(void) initBattle;
-(void) updateViewType:(BattleViewType) changeToType;
-(void) setViewpointCenter:(CGPoint) position;
-(void) checkBackgroundMusic:(ccTime)aTime;

@end
